package com.itheima.consumer.feign;

import com.itheima.consumer.config.FeignLogConfig;
import com.itheima.consumer.domain.Goods;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * todo
 *
 * @author Chengfei
 * @date 2020/8/24 21:16
 */
//@FeignClient(value = "eureka-provider",configuration = FeignLogConfig.class)
@FeignClient(value = "eureka-provider",configuration = FeignLogConfig.class,fallback = GoodsFeignClientFallback.class)
public interface GoodsFeignClient {

    /**
     * 类路径+方法路径
     * @param id
     * @return
     */
    @GetMapping("/goods/findOne/{id}")
    public Goods findGoodsById(@PathVariable("id") int id);
}
